import type { App, Directive } from "vue";

import permission from "./permission";
import debounce from "./debounce";
import throttle from "./throttle";
import copy from "./copy";
import focus from "./focus";

const directives: Record<string, Directive> = {
  permission,
  debounce,
  throttle,
  copy,
  focus
};

export default {
  install(app: App) {
    for (const [key, directive] of Object.entries(directives)) {
      app.directive(key, directive);
    }
  }
};
